﻿using BCCommon;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Text;

namespace BCDto.Sim.Admin.AdminPermissionConfig
{
    /// <summary>
    /// 员工权限配置
    /// </summary>
    public class AdminPermissionConfigRequestDto
    {
        /// <summary>
        /// 权限名称
        /// </summary>
        [Display(Name ="权限名称")]
        [Required(ErrorMessage = "{0} 为必填项")]
        public string PermissionName { get; set; }
        /// <summary>
        /// 权限码
        /// </summary>
        [Display(Name ="权限码")]
        [Required(ErrorMessage = "{0} 为必填项")]
        [StringLength(50, ErrorMessage = "{0} 权限码长度不应大于50个字符")]
        [RegularExpression(RegexPatterns.ENGLISH_AND_UNDERLINE,ErrorMessage ="{0} 权限码仅支持英文字符与下划线")]
        public string PermissionCode { get; set; }
        /// <summary>
        /// 权限路径码
        /// </summary>
        [Display(Name ="权限路径码")]
        [Required(ErrorMessage = "{0} 为必填项")]
        public string PermissionPathCode { get; set; }
    }
}
